<%=include('./common/commonLinks.html')(it, opt)%>
<%=include('./common/header.html')(it, opt)%>

<main id="content" role="main" class="autoBottom">
    <div class="wrap">
        <!--<%=include('./common/leftSide.html')(it, opt)%>-->
        <div class="mid-side">
            <div class="main-mid">
                <table class="main-table">
                    <thead>
                        <tr>
                            <th class="td-1 active">#</th>
                            <th class="td-2 active">Time</th>
                            <th class="td-3 active">Information</th>
                            <th class="td-4 active">uin</th>
                            <th class="td-5 active">ip</th>
                            <th class="td-6 active">Agent</th>
                            <th class="td-7 active">
                            <!--<div class="source_page_trigger" title="点击显示/隐藏原始上报"><input type="checkbox" checked="checked" id="show_source_page"><label for="show_source_page">Source</label></div>-->
                                Source
                            </th>
                        </tr>
                    </thead>
                    <tbody id="log-table">

                    </tbody>
                </table>
            </div>
        </div>
        <div class="right-side">
            <section>
                <div class="setting-show">
                    <span class="item active td-2" data-td="td-2" data-event-click="showTd">Time</span>
                    <span class="item active td-3" data-td="td-3" data-event-click="showTd">Information</span>
                    <span class="item active td-4" data-td="td-4" data-event-click="showTd">uin</span>
                    <span class="item active td-5" data-td="td-5" data-event-click="showTd">ip</span>
                    <span class="item active td-6" data-td="td-6" data-event-click="showTd">Agent</span>
                    <span class="item active td-7" data-td="td-7" data-event-click="showTd">Source</span>
                </div>
            </section>
            <section>
                <div class="log-select">
                    <!--  <input type="text" class="head-input" placeholder="选择业务"/>
                      <div class="head-btn" data-event-click="searchBusiness"><span class="glyphicon glyphicon-search"></span></div>-->
                    <select class="form-control " data-event-change="selectBusiness" id="select-business">
                        <option value="-1">-- 请选择项目 --</option>

                        <%  for(var i = 0 ; i < it.items.length ;i ++){
                            var itemOne = it.items[i];

                        %>
                        <option value="<%=itemOne.id%>"> (id=<%=itemOne.id%>) <%=itemOne.name%></option>
                        <%}%>
                    </select>
                </div>
                <div class="clear"></div>
            </section>
            <section>
                <p class="setting-title">消息类型
                <ul class="setting-msg">
                    <li class="msg-error" data-event-click="errorTypeClick">error</li>
                    <li class="msg-log" data-event-click="logTypeClick">log</li>
                    <li class="msg-debug" data-event-click="debugTypeClick">debug</li>
                </ul>
                <div class="clear"></div>
            </section>
            <section>
                <p class="setting-title">包含关键词</p>
                <div class="keyword-ctn">
                    <input type="text" class="keyword-ipt" id="keyword-ipt" data-event-keyup="addKeyword"/><button class="keyword-btn" data-event-click="addKeyword">添加</button><button class="keyword-btn" data-event-click="removeKeywords">清空</button>
                    <div class="keyword-tag-ctn" id="keyword-group">
                    </div>
                </div>
            </section>
            <section>
                <p class="setting-title">排除关键词</p>
                <div class="keyword-ctn">
                    <input type="text" class="keyword-ipt" id="debar-ipt" data-event-keyup="addDebar"/><button class="keyword-btn" data-event-click="addDebar">添加</button><button class="keyword-btn" data-event-click="removeDebars">清空</button>
                    <div class="keyword-tag-ctn" id="debar-group">
                    </div>
                </div>
            </section>
            <section>
                <div class="setting-search" data-event-click="showLogs">开始监听</div>
            </section>
        </div>
    </div>
</main>
<div id="detailModal" data-event-click="closeModal" class="click">
    <div class="content">
        <h4>
            <span class="id"></span>
            <a href="javascript:void(0);" class="pull-right click" data-event-click="closeModal" title="关闭弹窗">X</a>
        </h4>
        <p>
            <b>Time：</b><span class="time"></span>
        </p>
        <p>
            <b>Info：</b><div class="info"></div>
        </p>
        <p>
            <b>uin：</b><span class="uin"></span>
        </p>
        <p>
            <b>ip：</b><span class="ip"></span>
        </p>
        <p>
            <b>agent：</b><div class="agent"></div>
        </p>
        <p>
            <b>Source：</b><div class="source"></div>
        </p>
        <div class="click button" data-event-click="closeModal">关闭弹窗</button>
    </div>
</div>
<%=include('./common/footer.html')(it)%>
<script>
    var systime = '<%=it.systime%>' - 0;
    var currentTime = new Date - 0;
    var diffTime = systime - currentTime;
</script>
<script src="/static/entry.realtime.js"></script>
</body>
</html>
